home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 248_01 / dopt.h < prev    next >
Text File  |  1989-08-16  |  5KB  |  199 lines

  1. /*    DOPT:    Option settings for MicroSPELL 1.0
  2.         Spell Checker and Corrector
  3.  
  4.         (C)opyright May 1987 by Daniel Lawrence
  5.         All Rights Reserved
  6. */
  7.  
  8. #ifdef    LATTICE
  9. #undef    LATTICE        /* don't use their definitions...use ours    */
  10. #endif
  11. #ifdef    MSDOS
  12. #undef    MSDOS
  13. #endif
  14. #ifdef    CPM
  15. #undef    CPM
  16. #endif
  17. #ifdef    AMIGA
  18. #undef    AMIGA
  19. #endif
  20. #ifdef    EGA
  21. #undef    EGA
  22. #endif
  23.  
  24. #define    PROGNAME    "MicroSPELL"
  25. #define    VERSION        "1.0"
  26.  
  27. /*    Machine/OS definitions            */
  28.  
  29. #define AMIGA   0                       /* AmigaDOS            */
  30. #define ST520   0                       /* ST520, TOS                   */
  31. #define MSDOS   1                       /* MS-DOS                       */
  32. #define V7      0                       /* V7 UNIX or Coherent or BSD4.2*/
  33. #define    BSD    0            /* UNIX BSD 4.2    and ULTRIX    */
  34. #define    USG    0            /* UNIX system V        */
  35. #define VMS     0                       /* VAX/VMS                      */
  36. #define CPM     0                       /* CP/M-86                      */
  37. #define    FINDER    0            /* Macintosh OS            */
  38. #define CMS     0                       /* IBM VM/CMS                   */
  39.  
  40. /*    Compiler definitions            */
  41. #define MWC86   0    /* marc williams compiler */
  42. #define    LATTICE    0    /* Lattice 2.14 thruough 3.0 compilers */
  43. #define    AZTEC    1    /* Aztec C 3.20e */
  44. #define    MSC    0    /* MicroSoft C compiler version 3 & 4 */
  45. #define TURBO    0    /* Turbo C version 1.00 */
  46.  
  47. /*    Debugging options    */
  48. #define    RAMSIZE    0    /* dynamic RAM memory usage tracking */
  49. #define    RAMSHOW    0    /* auto dynamic RAM reporting */
  50.  
  51. /*    Terminal Output definitions        */
  52.  
  53. #define ANSI    0            /* ANSI escape sequences    */
  54. #define    HP150    0            /* HP150 screen driver        */
  55. #define    HP110    0            /* HP110 screen driver        */
  56. #define    VMSVT    0            /* various VMS terminal entries    */
  57. #define VT52    0                       /* VT52 terminal (Zenith).      */
  58. #define VT100   0                       /* Handle VT100 style keypad.   */
  59. #define RAINBOW 0                       /* Use Rainbow fast video.      */
  60. #define TERMCAP 0                       /* Use TERMCAP                  */
  61. #define    IBMPC    1            /* IBM-PC CGA/MONO/EGA driver    */
  62. #define    DG10    0            /* Data General system/10    */
  63. #define    TIPC    0            /* TI Profesional PC driver    */
  64. #define    Z309    0            /* Zenith 100 PC family    driver    */
  65. #define    MAC    0            /* Macintosh            */
  66. #define    ATARI    0            /* Atari 520/1040ST screen    */
  67. #define IBM3270 0                       /* IBM 3270 terminal device     */
  68.  
  69. /*    Configuration options    */
  70.  
  71. #define    REVSTA    1    /* Status line appears in reverse video        */
  72. #define    COLOR    1    /* color commands and windows            */
  73.  
  74. #define    CRYPT    0    /* file encryption enabled?            */
  75. #define    EMACS    1    /* Allow the use of an editor for replacement scan*/
  76. #define    CMPRS    1    /* main dictionary compression enabled        */
  77.  
  78. #define ASCII    1    /* always using ASCII char sequences for now    */
  79. #define EBCDIC    0    /* later IBM mainfraim versions will use EBCDIC    */
  80.  
  81. /*    System dependant library redefinitions, structures and includes    */
  82.  
  83. #define    FLAG    int
  84.  
  85. #if    TURBO
  86. #undef LATTICE
  87. #define    LATTICE    1
  88. #endif
  89.  
  90. #if    CMS
  91. /* EXIT() seems to not work as documented, while RETURN() does... */
  92. #define    exit(a)    return(a)
  93. #define    fopen    cmsopen
  94. FILE *cmsopen();
  95. #endif
  96.  
  97. #if    AZTEC & MSDOS
  98. #undef    fputc
  99. #undef    fgetc
  100. #undef    fgets
  101. #define    fgetc    a1getc
  102. #define    fgets    a1gets
  103. #define    fputc    aputc
  104. #define    int86    sysint
  105. #define    intdos(a, b)    sysint(33, a, b)
  106. #define    inp    inportb
  107. #define    outp    outportb
  108.  
  109. struct XREG {
  110.     int ax,bx,cx,dx,si,di;
  111. };
  112.  
  113. struct HREG {
  114.     char al,ah,bl,bh,cl,ch,dl,dh;
  115. };
  116.  
  117. union REGS {
  118.     struct XREG x;
  119.     struct HREG h;
  120. };
  121. #endif
  122.  
  123. #if    MSDOS & MWC86
  124. #include    <dos.h>
  125. #define    int86(a, b, c)    intcall(b, c, a)
  126. #define    inp    in
  127.  
  128. struct XREG {
  129.     int ax,bx,cx,dx,si,di,ds,es,flags;
  130. };
  131.  
  132. struct HREG {
  133.     char al,ah,bl,bh,cl,ch,dl,dh;
  134.     int ds,es,flags;
  135. };
  136.  
  137. union REGS {
  138.     struct XREG x;
  139.     struct HREG h;
  140. };
  141. #endif
  142.  
  143. #if    MSDOS & MSC
  144. #include    <dos.h>
  145. #include    <memory.h>
  146. #define    peek(a,b,c,d)    movedata(a,b,FP_SEG(c),FP_OFF(c),d)
  147. #define    poke(a,b,c,d)    movedata(FP_SEG(c),FP_OFF(c),a,b,d)
  148. #define    movmem(a, b, c)        memcpy(b, a, c)
  149. #endif
  150.  
  151. #if    MSDOS & LATTICE
  152. #undef    CPM
  153. #undef    LATTICE
  154. #include    <dos.h>
  155. #undef    CPM
  156. #endif
  157.  
  158. #if    VMS
  159. #define    unlink(a)    delete(a)
  160. #endif
  161.  
  162. /*    define memory mapped flag    */
  163.  
  164. #define    MEMMAP    0
  165.  
  166. #if    IBMPC
  167. #undef    MEMMAP
  168. #define    MEMMAP    1
  169. #endif
  170.  
  171. #if    Z309
  172. #undef    MEMMAP
  173. #define    MEMMAP    1
  174. #endif
  175.  
  176. /*    internal constants    */
  177.  
  178. #define    TRUE    1
  179. #define    FALSE    0
  180.  
  181. #define NFILEN  80                      /* # of bytes, file name        */
  182. #define NLINE   256                     /* # of bytes, input line       */
  183. #define    NSTRING    128            /* # of bytes, string buffers    */
  184. #define    MAXLINE    1024            /* max line length of source file */
  185. #define HUGE    1000                    /* Huge number                  */
  186. #define    NCOLORS    8            /* number of supported colors    */
  187. #define    MAXCOM    1000            /* max # of common words    */
  188. #define    MAXSPELL 8            /* max # of files to spell    */
  189. #define    MAXWORDS 1000            /* max # of source words/bucket    */
  190. #define    NBUFSIZ    1024            /* file buffer size for decomp    */
  191.  
  192. /*    exit codes    */
  193.  
  194. #define    EXGOOD        0        /* successfull run!        */
  195. #define    EXMDICT        1        /* missing dictionary        */
  196. #define    EXBADOPT    2        /* bad command line option    */
  197. #define    EXNORAM        3        /* out of RAM            */
  198. #define    EXTEMP        4        /* can't open temp file        */
  199.